package org.hzz.promotions.domain.entity;

import io.gitee.pkmer.ddd.shared.Entity;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hzz.promotions.types.enums.code.CodeStatus;
import org.hzz.promotions.types.enums.code.CodeType;

import java.time.LocalDateTime;

/**
 * @author <a href="mailto:1193094618@qq.com">pkmer</a>
 * <br>
 * <a href = "https://gitee.com/developeros/videos-online">Code Repository</a>
 * At 2024/8/31
 * 兑换码实体
 */
@Data
@Accessors(chain = true)
public class ExchangeCodeEntity implements Entity {
    // 兑换码id
    private Integer id;

    // 兑换码
    private String code;

    // 兑换码状态， 1：待兑换，2：已兑换，3：兑换活动已结束
    private CodeStatus status;

    // 兑换人
    private Long userId;

    // 兑换类型，1：优惠券，以后再添加其它类型
    private CodeType type;

    // 兑换码目标id，例如兑换优惠券，该id则是优惠券的配置id
    private Long exchangeTargetId;


    // 兑换码过期时间
    private LocalDateTime expiredTime;
}
